package com.softaria.windows.config;

import java.util.List;

import com.softaria.windows.model.FloatPositionCalculator;
import com.softaria.windows.model.FloatSizeCalculator;
import com.softaria.windows.model.ModelUrl;
import com.softaria.windows.model.PerspectiveUrl;
import com.softaria.windows.model.ViewUrl;

/**
 * Configuration mostly used by MenuTree and sone other widgets
 * 
 * @author Roman M Kuzmin (roman@softaria.com)
 * 
 */
public interface MenuConfiguration {

  /**
   * @return ordered list of perspectives for left menu
   */
  public List<PerspectiveUrl> getPerspecives();

  /**
   * @param perspective
   *          - url of perspective for view list
   * @return ordered list of views that belong to given perspective
   */
  public List<ViewUrl> getViews(PerspectiveUrl perspective);

  /**
   * 
   * @param asPerspectiveUrl
   * @return subset of what previous method returns. This subset includes only
   *         views that should be opened by the system automatically, wheb
   *         perspective is clicked
   */
  public List<ViewUrl> getAutoOpenViews(PerspectiveUrl asPerspectiveUrl);

  /**
   * 
   * @return default perspective or null, if no default exists
   */
  public PerspectiveUrl getDefaultPerspective();

  /**
   * 
   * @param url
   *          - url of perspective or view
   * @return label for left menu navigation. For perspectives, it also used to
   *         name tabs
   */

  public String getMenuLabel(ModelUrl url);

  /**
   * 
   * @param url
   *          - url of perspective or view
   * @return text for context help or null
   */
  public String getDefaultHelpMessage(ModelUrl url);

  public String getDefaultHelpTitle(ModelUrl url);

  /**
   * 
   * @param viewUrl
   *          - url of view
   * @return Calculator for Frame position or null
   */
  public FloatPositionCalculator getDefaultPosition(ViewUrl viewUrl);

  /**
   * 
   * @param viewUrl
   *          - url of view
   * @return Calculator for Frame size or null
   */
  public FloatSizeCalculator getDefaultSize(ViewUrl viewUrl);

}
